import request from '@/utils/request'

export function listShop(query) {
  return request({
    url: '/shop/listShop',
    method: 'get',
    params: query
  })
}

export function createShop(data) {
  return request({
    url: '/shop/createShop',
    method: 'post',
    data
  })
}

export function delShop(data) {
  return request({
    url: '/shop/delShop',
    method: 'post',
    data
  })
}

export function revocatShop(id, type) {
  return request({
    url: '/shop/revocatShop/' + id + '/' + type,
    method: 'post'
  })
}

/**
 * 获取播报机列表
 * @param data
 */
export function playerList(data) {
  return request({
    url: '/shop/playerManagement/list',
    method: 'post',
    data
  })
}

/**
 * 获取门店列表
 * @param data
 */
export function storeList(data) {
  return request({
    url: '/shop/store/storeList',
    method: 'post',
    data
  })
}

/**
 * 获取播报机版本号列表
 * @param data
 */
export function editionList(data) {
  return request({
    url: '/shop/playerManagement/editionList/2',
    method: 'post',
    data
  })
}

/**
 * 添加播报机
 * @param data
 */
export function playerAdd(data) {
  return request({
    url: '/shop/player/add',
    method: 'post',
    data
  })
}

/**
 * 获取播报机打印订单记录
 * @param data
 */
export function playerPrintList(data) {
  return request({
    url: '/shop/player/detail',
    method: 'post',
    data
  })
}

/**
 * 获取商品分类树形结构
 * @param data
 */
export function goodsTypeTreeList() {
  return request({
    url: '/shop/commodityClassification/treeList',
    method: 'post'
  })
}

/**
 * 获取收费模板列表
 * @param data
 */
export function collectMoneyTemplateList(data) {
  return request({
    url: 'https://mockapi.eolinker.com/1RUIyUr58a7c491f47fa8963ed61e408db7c055d389eb37/shop/collectMoneyTemplate/list',
    method: 'post',
    data: data
  })
}

/**
 * 获取门店位置列表
 * @param data
 */
export function storePositionList(data) {
  return request({
    url: '/shop/storePositionList',
    method: 'post',
    data: data
  })
}

/* export function listCatAndBrand() {
  return request({
    url: '/goods/catAndBrand',
    method: 'get'
  })
}
 */

